<template>
  <div>
    授权中。。。
  </div>
</template>

<script>

  import {
    GetQueryString,
  } from './mixin'
  export default {
    data() {
      return {
        token: ''
      }
    },

    created() {
      const wxtoken = GetQueryString('code')
      if (wxtoken ) {
        localStorage.setItem('user_token', wxtoken)
        const historyUrl = localStorage.getItem('authUrl')
        this.$router.replace(historyUrl)
        //  removeLocalStorage('authUrl')
      } else {
        // 没有拿到后台访问微信返回的token
        // Toast('授权失败请关闭网页重新进入')
        localStorage.removeItem('share_token')
        localStorage.removeItem('authUrl')
      }
    }
  }

</script>